package com.zhxxfwzx.common.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.baomidou.mybatisplus.annotation.IEnum;
import com.fasterxml.jackson.annotation.JsonValue;
import com.zhxxfwzx.entity.SysUser;

import java.io.Serializable;

/**
 * @Description TODO
 * @title: SexEnum
 * @Author LiJing
 * @Date: 2021/6/1812:59 上午
 * @Version 1.0
 */
public enum SexEnum implements IEnum<Integer> {
    MAN(1, "男"),
    WOMAN(2, "女");

    @JsonValue
    @EnumValue
    private int value;
    private String desc;

    SexEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public String getDesc() {
        return desc;
    }

    @Override
    public Integer getValue() {
        return this.value;
    }

    @Override
    public String toString() {
        return this.getDesc();
    }
}
